<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<div class="panel-body">
	 <%-- other table content here --%>
	 <!-- form filed -->
	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right">计价单位:</label>
		<div class="col-xs-4">
			<input type="text" id="unit" name="unit" value="${goods.unit}"
				   placeholder="计价单位" class="form-control  ">
		</div>
	</div>
	<c:if test="${goodsCat.goodsType.joinBrand eq 1 }">
	<!-- form filed -->
	<div class="form-group">
		<label class="col-sm-2 control-label no-padding-right">品牌:</label>
		<div class="col-xs-4">
				<select id="brandId" name="brandId" class="form-control">
					<option value=""> -- 请选择品牌 -- </option>
					<c:forEach items="${goodsCat.goodsType.typeBrandMap}" var="map">
					<option value="${map.brand.id }" <c:if test="${map.brand.id eq goods.brand.id}">selected</c:if>>${map.brand.name }</option>
					</c:forEach>
				</select>
		</div>
	</div>
	</c:if>
	<c:forEach items="${props }" var="prop">
		<c:if test="${prop.type eq 1 or prop.type eq 2 }">
		<!-- form filed -->
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">${prop.name }:</label>
			<div class="col-xs-4">
				<input type="hidden" name="propnames" value="${prop.name }">
				<input type="text" name="propvalues" value="${prop.value }"
					   placeholder="${prop.name }" class="form-control  
					   <c:if test="${not empty prop.datatype }">${prop.datatype}</c:if> 
					   <c:if test="${prop.required eq 1}">required</c:if>">
			</div>
		</div>
		</c:if>
		<c:if test="${prop.type eq 3 or prop.type eq 4 }">
		<!-- form filed -->
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">${prop.name }:</label>
			<div class="col-xs-4">
				<input type="hidden" name="propnames" value="${prop.name }">
				<select name="propvalues" class="form-control    
					   <c:if test="${not empty prop.datatype }">${prop.datatype}</c:if> 
					   <c:if test="${prop.required eq 1}">required</c:if>">
					<option value=""> -- 请选择${prop.name } -- </option>
					<c:forEach items="${prop.optionMap}" var="map" varStatus="status">
					<option value="${status.index }" <c:if test="${map.selected ==  1}">selected</c:if>>${map.name }</option>
					</c:forEach>
				</select>
			</div>
		</div>
		</c:if>
	</c:forEach>
</div>